<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>多彩主题背景切换</title>
    <style>
        * {
            padding: 0;
            margin: 0;
            box-sizing: border-box;
        }

        body {
            background: url('https://images.unsplash.com/photo-1520763185298-1b434c919102?auto=format&fit=crop&w=2000&q=80') no-repeat center center fixed;
            background-size: cover;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            transition: background 1.2s ease-in-out;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            position: relative;
        }

        body::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, rgba(255, 182, 193, 0.3) 0%, rgba(255, 192, 203, 0.2) 100%);
            z-index: -1;
        }

        .header {
            text-align: center;
            margin-bottom: 40px;
            color: #d16b86;
        }

        .header h1 {
            font-size: 2.8rem;
            margin-bottom: 10px;
            font-weight: 300;
            letter-spacing: 1px;
        }

        .header p {
            font-size: 1.2rem;
            opacity: 0.9;
        }

        .nav {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 25px;
            width: 90%;
            max-width: 850px;
            height: 240px;
            padding: 25px;
            background-color: rgba(255, 255, 255, 0.85);
            border-radius: 20px;
            box-shadow: 0 10px 25px rgba(209, 107, 134, 0.2);
            backdrop-filter: blur(5px);
            border: 1px solid rgba(255, 255, 255, 0.6);
        }

        .image-container {
            position: relative;
            border-radius: 12px;
            overflow: hidden;
            transition: all 0.4s ease;
            box-shadow: 0 8px 16px rgba(209, 107, 134, 0.15);
            border: 2px solid transparent;
        }

        .nav img {
            width: 160px;
            height: 190px;
            object-fit: cover;
            display: block;
            transition: all 0.4s ease;
        }

        .image-container:hover {
            transform: translateY(-8px) rotate(2deg);
            box-shadow: 0 15px 25px rgba(209, 107, 134, 0.25);
            border: 2px solid #ffb6c1;
        }

        .image-container:hover img {
            transform: scale(1.08);
        }

        .image-name {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(to top, rgba(209, 107, 134, 0.9), transparent);
            padding: 12px;
            text-align: center;
            font-size: 1rem;
            color: white;
            transform: translateY(100%);
            transition: transform 0.4s ease;
        }

        .image-container:hover .image-name {
            transform: translateY(0);
        }

        .current-bg {
            margin-top: 30px;
            text-align: center;
            background: rgba(255, 255, 255, 0.8);
            padding: 12px 25px;
            border-radius: 30px;
            color: #d16b86;
            font-size: 1.1rem;
            box-shadow: 0 5px 15px rgba(209, 107, 134, 0.2);
            transition: all 0.3s ease;
        }

        .current-bg:hover {
            transform: scale(1.05);
            box-shadow: 0 8px 20px rgba(209, 107, 134, 0.3);
        }
    </style>
</head>

<body>
    <div class="header">
        <h1>多彩主题背景切换</h1>
    </div>

    <div class="nav">
        <div class="image-container">
            <img src="https://images.unsplash.com/photo-1520763185298-1b434c919102?auto=format&fit=crop&w=400&h=500&q=80" alt="粉色玫瑰">
            <div class="image-name">玫瑰</div>
        </div>
        <div class="image-container">
            <img src="https://n.sinaimg.cn/sinacn07/0/w1440h960/20180323/a633-fysnevk9008344.jpg?auto=format&fit=crop&w=400&h=500&q=80" alt="樱花">
            <div class="image-name">樱花</div>
        </div>
        <div class="image-container">
            <img src="https://c-ssl.duitang.com/uploads/blog/202104/10/20210410000415_226ca.jpg?auto=format&fit=crop&w=400&h=500&q=80" alt="郁金香">
            <div class="image-name">郁金香</div>
        </div>
        <div class="image-container">
            <img src="https://tgi13.jia.com/114/927/14927319.jpg?auto=format&fit=crop&w=400&h=500&q=80" alt="牡丹">
            <div class="image-name">牡丹</div>
        </div>
    </div>

    <div class="current-bg" id="currentBackground">
        当前背景：粉色玫瑰
    </div>

    <script>
        var images = document.querySelector('.nav').querySelectorAll('img');
        var currentBgElement = document.getElementById('currentBackground');
        var imageNames = ["粉色玫瑰", "樱花", "郁金香", "牡丹"];
        
        for (var i = 0; i < images.length; i++) {
            images[i].onclick = function() {
                document.body.style.backgroundImage = 'url(' + this.src + ')';
                
                // 更新当前背景显示
                var index = Array.from(images).indexOf(this);
                currentBgElement.textContent = "当前背景：" + imageNames[index];
                
                // 添加背景切换动画效果
                document.body.style.opacity = 0;
                setTimeout(function() {
                    document.body.style.opacity = 1;
                }, 150);
            }
        }
    </script>
</body>
</html>